#include<iostream>
using namespace std;

int main()
{

	char get_chars;
	int letters = 0, space = 0, digit = 0, other = 0;
	cout << "cin:";

	while ((get_chars = getchar()) != '\n')
	{
		
		if (get_chars >= 'a'&&get_chars <= 'z' || get_chars >= 'A'&&get_chars <= 'Z')
			letters++;
		else if (get_chars >= '0'&&get_chars <= '9')
			digit++;
		else if (get_chars = ' ')
			space++;
		else
			other++;

	}
	cout << "letters:" << letters << endl;
	cout << "digit:" << digit << endl;
	cout << "space:" << space << endl;
	cout << "other" << other << endl;
	
	int key;
	cin >> key;
	return 0;
}
